package com.gientecher.consulprovider.runner;

import com.gientecher.consulprovider.service.RegisterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

/**
 * 实现启动后注册
 */
//@Component
//@Order(value = 1)
public class AfterRunner implements ApplicationRunner {

    @Autowired
    private RegisterService registerService;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        registerService.doRegister();
    }
}
